-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[podmanreceiver] add scraper's shutdown method #32981
[podmanreceiver] add scraper's shutdown method #32981
Conversation
No changes on the end user, skip changelog? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think since shutdown
wasn't being called properly before (and we were leaking a goroutine), this can be considered a bug fix, so we probably want a changelog.
CI/CD failure:
|
254d18d
to
2335536
Compare
2335536
to
9a82696
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing!
Co-authored-by: Curtis Robert <[email protected]>
Co-authored-by: Curtis Robert <[email protected]>
See CLA issues. |
Seems to be related with the suggested applied commits. Could you take a look @crobert-1 ? |
/easycla |
My apologies, not sure what's going on here. I've filed a support ticket against EasyCLA, I'll share any relevant updates. |
Ticket update:
|
/easycla |
) (receiver.Metrics, error) { | ||
podmanConfig := config.(*Config) | ||
|
||
return newMetricsReceiver(params, podmanConfig, nil, consumer) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why bother to have the newMetricsReceiver
function on Windows? Why not return the error directly from createMetricsReceiver
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense to me, I was thinking to even remove the windows
file as the docker
receiver implementation.
} | ||
|
||
func (r *metricsReceiver) start(ctx context.Context, _ component.Host) error { | ||
var err error | ||
err := r.config.Validate() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you calling Config.Validate
in the component start function? I don't think this function should be called by component authors. It is called for each component during collector setup:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point! I will open a PR to remove it
Description:
containerEventLoop
go routine. Similar to the dockerstats: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/receiver/dockerstatsreceiver/receiver.go#L76Link to tracking Issue: Related issue #29994
Testing:
Use scraper instead of metrics receiver interface.
Documentation: